program Project1;

{$APPTYPE CONSOLE}

uses
  SysUtils,
  EMMemList,EMBaseList;

type
  TPoint = record
    X: Integer;
    Y: Integer;
  end;
  PPoint = ^TPoint;

var
  //ML : TEMBaseList;
  ML : TEMMemList;
  Point : PPoint;
  I,J : Integer;
  K : ^Integer;
begin
  //ML := TEMBaseList.Create;
  ML := TEMMemList.Create(10);
//  New(Point);
//  Point.X := 1;
//  Point.Y := 1;
//  ML.Add(Point);
//  Writeln(ML.Count);
//  Readln;
  for I := 0 to 100 do
  begin
    New(Point);
    Point.X := I;
    Point.Y := I;
    ML.Add(Point);
  end;
//  for I := 0 to ML.Count - 1 do
//  begin
//    Writeln(TPoint(ML[I]^).X,' ',TPoint(ML[I]^).Y);
//  end;
//  Readln;

  J := (ML.Count - 1) div 2;
  for I := 0 to J do
  begin
    Point := ML[I];
    ML[I] := ML[ML.Count - 1 - I];
    ML[ML.Count - 1 - I] := Point;
  end;

  for I := 0 to ML.Count - 1 do
  begin
    Writeln(TPoint(ML[I]^).X,' ',TPoint(ML[I]^).Y);
  end;
  Readln;

//  for I := 0 to ML.Count - 1 do
//  begin
//    dispose(ML[I]);
//  end;
  ML.Free;

end.
